//仓库
const warehouse = (username: string, password: string) => {
    // return uni.request({
    //     url: '/login',
    //     method: 'POST',
    //     data: {
    //         username,
    //         password
    //     }
    // });
    return new Promise((resolve, reject) => {
        // 模拟登录成功
            resolve({
                statusCode: 200,
                data: {
                    code: 200,
                    message: '登录成功',
                    data: {
                        // 仓库模拟数据
                        list :[
                            {
                                name: "仓库1",
                                code: "M1001"
                            },
                            {
                                name: "仓库2",
                                code: "M1002"
                            },
                            {
                                name: "仓库3",
                                code: "M1003"
                            },
                            {
                                name: "仓库4",
                                code: "M1004"
                            },
                            {
                                name: "仓库2",
                                code: "M1002"
                            },
                            {
                                name: "仓库3",
                                code: "M1003"
                            },
                            {
                                name: "仓库4",
                                code: "M1004"
                            }
                        ]
                    }
                }
            });
    });
};
//仓位
const location = (username: string, password: string) => {
    // return uni.request({
    //     url: '/login',
    //     method: 'POST',
    //     data: {
    //         username,
    //         password
    //     }
    // });
    return new Promise((resolve, reject) => {
        // 模拟登录成功
            resolve({
                statusCode: 200,
                data: {
                    code: 200,
                    message: '登录成功',
                    data: {
                        // 仓库模拟数据
                        list :[
                            {
                                name: "仓位1",
                                code: "CW001"
                            },
                            {
                                name: "仓位2",
                                code: "CW002"
                            },
                            {
                                name: "仓位3",
                                code: "CW003"
                            },
                            {
                                name: "仓位4",
                                code: "CW004"
                            },
                            {
                                name: "仓位2",
                                code: "CW002"
                            },
                            {
                                name: "仓位3",
                                code: "CW003"
                            },
                            {
                                name: "仓位4",
                                code: "CW004"
                            }
                        ]
                    }
                }
            })
        
    })
}
export default {
    warehouse,
    location

}